import Outer from '@/components/Outer.vue'
import NotFound from '@/views/NotFound.vue'
const Dashboard=()=>import('@/views/Dashboard.vue')
const Article=()=>import('@/views/Article.vue')
const EditArticle=()=>import('@/views/EditArticle.vue')
const EditArticle2=()=>import('@/views/EditArticle2.vue')
const Settings=()=>import('@/views/Settings.vue')

export default [
    {
      path: '/',
      redirect: '/dashboard'
    },
    {
      path: '*',
      redirect: '/404'
    },
    {
      path: '/dashboard',
      name: 'dashboard',
      meta:{
        isNav:true,
        icon:'el-icon-odometer',
        title:'仪表盘'
      },
      components:{
        default:Dashboard,
        out:Outer
      }
    },
    {
      path: '/article',
      name: 'article',
      meta:{
        isNav:true,
        icon:'el-icon-chat-line-square',
        title:'文章列表'
      },
      components:{
        default:Article,
        out:Outer
      }
    },
    {
      path: '/editarticle',
      name: 'editarticle',
      meta:{
        isNav:true,
        icon:'el-icon-chat-line-square',
        title:'编辑文章'
      },
      components:{
        default:EditArticle,
        out:Outer
      }
    },
    {
      path: '/editarticle2/:id',
      name: 'editarticle2',
      meta:{
        isNav:false,
        icon:'el-icon-chat-line-square',
        title:'编辑文章'
      },
      components:{
        default:EditArticle2,
        out:Outer
      }
    },
    {
      path: '/settings',
      name: 'settings',
      meta:{
        isNav:true,
        icon:'el-icon-setting',
        title:'设置'
      },
      components:{
        default:Settings,
        out:Outer
      }
    },
    {
      path: '/404',
      name: 'NotFound',
      components:{
        default:NotFound,
        out:Outer
      },
      meta:{
        isNav:false
      }
    }
  ]

